var t = require("../../utils/config"), e = require("../../utils/api"), a = require("../../utils/request"), r = require("../../utils/storage");

Component({
    properties: {
        reservations: Array
    },
    data: {
        themeColor: getApp().globalData.themeColor
    },
    lifetimes: {
        attached: function() {},
        detached: function() {},
        ready: function() {}
    },
    methods: {
        viewDetail: function(c) {
            var o = this;
            o.setData({
                loading: !0
            }), t.getH5ResvDetailUrl().then(function(t) {
                var n = r.getStorageSync(r.storageKey.uid), i = c.target.dataset.card.num, s = !([ "CRS_BulkLd", "WEB_BulkResv", "ZJ_OutSideInPut", "PQ_Bulkld", "PQ_BulkLd", "KA_Family", "KA_WEB_BULK_RESV" ].indexOf(c.target.dataset.card.sourceValue) >= 0), d = c.target.dataset.card.resvPID || "", u = c.target.dataset.card.isVIP || "0", l = c.target.dataset.card.companyId, g = c.target.dataset.card.ldno, p = n || "", v = "cardNo=".concat(i, "&bindCard=").concat(s, "&isVIP=").concat(u, "&resvPid=").concat(d, "&companyID=").concat(l, "&ldNo=").concat(g, "&isVCard=").concat(!0, "&source=wechatAppletNew&operator=").concat(p), h = t;
                a.request(a.HttpMethod.POST, e.apiRoute.encodeResvUrl, {
                    urlpara: v
                }).then(function(t) {
                    console.log("加密后的url：", t.url);
                    var e = "".concat(h, "&accesskey=").concat(t.url);
                    wx.navigateTo({
                        url: "/pages/webview/webview?h5=".concat(encodeURIComponent(e)),
                        success: function() {
                            o.setData({
                                loading: !1
                            });
                        }
                    });
                });
            });
        }
    }
});